/*
 * orderlist.h
 *
 *  Created on: 2013-2-15
 *      Author: panqiuhui
 */

#ifndef ORDERLIST_H_
#define ORDERLIST_H_
#include <stdbool.h>
#include "orderinfo.h"

typedef struct orderinfo OrderItem;

typedef struct order_node {
	OrderItem item;
	struct order_node *next;
} OrderNode;

typedef OrderNode * OrderList;

void InitializeList(OrderList * plist);

bool ListIsEmpty(const OrderList * plist);

bool ListIsFull(const OrderList * plist);

unsigned int ListItemCount(const OrderList * plist);

bool AddItem(OrderItem item, OrderList *plist);

void Traverse(const OrderList * plist, void (*pfun)(OrderItem item));

void EmptyTheList(OrderList * plist);

#endif /* ORDERLIST_H_ */
